<?php
/**
 *@author Connor <caokang@foxmail.com>
 *@todo
 *@link www.zeevin.com
 */
?>
<div class="title">
	<h3>发信箱 </h3>
	<ul>
			<li><?php echo CHtml::link('收件箱', array('pm/inbox'),array('title'=>'收件箱'))?></li>
            <li class="current"><?php echo CHtml::link('发件箱', array('pm/outbox'),array('title'=>'发件箱'))?></li>
	</ul>
</div>
<div class="main_content">
	<div class="send">
		<div class="send_tab">
			<ul>
				<li class="hover">所有信件</li>
                      
			</ul>
		</div>
		<table width="640" border="0" cellspacing="0" cellpadding="0">
			<thead>
				<tr>
					<th width="60" style="text-align:left; padding-left:20px;">送往</th>
					<th width="350" style="text-align:left; padding-left:20px;">话题</th>
					<th width="120">时间</th>
					<th width="70">选择</th>
				</tr>
			</thead>
			<tbody>
			<?php if($data['total_num']>0):;?>
				<?php foreach($data['rows'] as $k=>$v):?>
				<tr class='color' >
					<td><?php $tmp = User::getUserById($v->to_uid); echo $tmp->nickname;?></td>
					<td class="info_width"><a href="<?php echo  Yii::app()->urlManager->createUrl('pm/detail',array('id'=>$v->id,'ref'=>'1')); ?>" title="<?php echo nl2br(CHtml::encode($v->subject));?>"><?php echo nl2br(CHtml::encode($v->subject));?></a></td>
					<td><?php echo substr($v->ctime,0,16);?></td>
					<td class="center"><input type="checkbox" value="<?php echo $v->id?>" name="mid"/></td>
				</tr>
				<?php endforeach;?>
			<?php else:?>
				<tr><td colspan=3>发信箱无内容</td></tr>
			<?php endif;?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="3" style="padding-right:10px;"><span class="delete" id='outbox'>删除</span></td>
					<td><span>全选</span>
						<input type="checkbox" name="send_check" class="allcheck"/></td>
				</tr>
			</tfoot>
			</table>
			<div class="page">
				<?php $this->widget('ZLinkPager', array('pages' => $data['pages'])); ?>
			</div>
		</div>
	</div>